package com.dmagic.cms.service;

import java.util.List;

import com.dmagic.cms.common.exception.ServiceException;
import com.dmagic.cms.common.exception.ValidateException;
import com.dmagic.cms.common.query.PageUtil;
import com.dmagic.cms.entity.AppUser;
import com.dmagic.cms.entity.Permission;

public interface AppUserService {

	/**
	 * 
	 * @param appUserId
	 * @return
	 * 
	 * @author songlin.li
	 */
	public AppUser getAppUserByUserId(Long appUserId);

	/**
	 * get appUser by userName
	 * 
	 * @param userName
	 * @return
	 * @throws Exception
	 * 
	 * @author songlin.li
	 */
	public AppUser getAppUserByUserName(String userName) throws Exception;

	/**
	 * 
	 * @author songlin.li
	 * @param appUserId
	 */
	public void deleteUserById(Long appUserId) throws Exception;

	/**
	 * 
	 * @param userIds
	 * @throws ServiceException
	 * 
	 * @author songlin.li
	 */
	public void deleteUser(List<Long> userIds) throws ServiceException;

	/**
	 * 
	 * @param entity
	 * @throws ValidateException
	 * 
	 * @author songlin.li
	 */
	public void saveAppUser(AppUser entity) throws ValidateException;


	/**
	 * @param pageUtil
	 * @return
	 * @throws ServiceException
	 * 
	 * @author songlin.li
	 */
	public void searchAppUser(PageUtil<AppUser> pageUtil) throws ServiceException;

	public List<Permission> getAllPermissions();

}
